package l2hc.gameserver.stats.conditions;

import l2hc.gameserver.model.Creature;
import l2hc.gameserver.stats.Env;

public class ConditionTargetMonsterCorpse extends Condition
{
  private final boolean _flag;

  public ConditionTargetMonsterCorpse(boolean flag)
  {
    this._flag = flag;
  }

  protected boolean testImpl(Env env)
  {
    Creature target = env.target;
    return (target != null) && (target.isMonster()) && (target.isDead() == this._flag);
  }
}
